package org.zoomdev.zoom.common.utils;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public class TypeReference<T> implements Comparable<T> {

    private final Class<T> type;

    public TypeReference() {
        Type superClass = getClass().getGenericSuperclass();
        type = (Class<T>) ((ParameterizedType) superClass).getActualTypeArguments()[0];
    }

    @Override
    public int compareTo(T o) {
        return 0;
    }

    public Class<T> getType() {
        return type;
    }
}
